package com.ukao.steward.adapter;

import android.content.Context;
import android.widget.TextView;

import com.ukao.steward.R;
import com.ukao.steward.base.ListBaseAdapter;
import com.ukao.steward.base.SuperViewHolder;
import com.ukao.steward.bean.TradeOrderBean;
import com.ukao.steward.util.CheckUtils;

import java.util.List;

/**
 * Created by ukaodev on 2017/6/14.
 */

public class PayListAdapter extends ListBaseAdapter<TradeOrderBean.ListBean> {




    public PayListAdapter(Context mContext, List<TradeOrderBean.ListBean> datas) {
        super(mContext, datas);

    }


    @Override
    public int getLayoutId() {
        return R.layout.adapter_pay_list;
    }

    @Override
    public void onBindItemHolder(SuperViewHolder holder, int position) {
        TextView amount = holder.getView(R.id.amount);
        TextView payMethodText = holder.getView(R.id.payMethodText);
        TradeOrderBean.ListBean item = mDataList.get(position);
        amount.setText("￥"+CheckUtils.isEmptyNumber(item.getAmount()));
        payMethodText.setText(item.getPayMethodText()+"支付");


    }
}
